<%@ page import="cn.kgc.service.NewsDetailService" %>
<%@ page import="cn.kgc.service.NewsDetailServiceImpl" %>
<%@ page import="cn.kgc.pojo.NewsDetail" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/9/13
  Time: 16:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    NewsDetailService newsDetailService =new NewsDetailServiceImpl();
    List<NewsDetail> list= newsDetailService.getAllNewsDetail();
    //jdk8 流操作遍历数据 n 就是集合中的数据
    for (NewsDetail news:
         list) {
        out.println(news.getId()+news.getSummary()+news.getContent()+"<br/>");
    }



%>


</body>
</html>
